package com.yun.kin.blog.dao;


import com.yun.kin.blog.po.Tag;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
/**
 * @author jin
 * @Description
 * @Date 2021/3/4 11:07
 */
public interface TagRepository extends JpaRepository<Tag,Long>{

    Tag findByName(String name);

    @Query("select t from Tag t")
    List<Tag> findTop(Pageable pageable);
}
